#ifndef AUTOMAT_H
#define AUTOMAT_H

#include <stdlib.h>  // for size_t
#include "Token.h"

class State;
class IScanner;

class Automat {
public:
	virtual ~Automat() {};
	virtual TokenType handle(char c) = 0;
};

class AutomatOO: public Automat {
public:
	AutomatOO(IScanner* scanner);
	virtual ~AutomatOO();

	virtual TokenType handle(char c);

	void setCurrentState(State* s);
	void ungetChar(size_t count = 1);
	void error();
private:
	State* currentState;
	IScanner* scanner;
};

#endif
